<?php
	// these are include_once() instead of require_once() because the extra fill
	// in utility needs to require this file without errors, and the paths are
	// never going to be correct
	require_once($_SERVER["DOCUMENT_ROOT"]."/modules/pd_character.php");
	require_once($_SERVER["DOCUMENT_ROOT"]."/modules/permissions.php");

	class Account {
		private $name;
                private $alliance;
		private $password;
		private $universe;
		private $permissions;
		private $level;
                private $validation;
                private $basic_scripts;
                private $advanced_scripts;
                private $admin_scripts;
                private $ffm_upload;
                private $sb_script_access;
                private $secret_scripts;
                private $pilotId;
                private $chat_level;
                private $id;

		public function __construct($name, $password, $universe, $permissions, $level, $validation = "", $pilotId = 0, $basic = 0, $advanced = 0, $admin = 0, $pfcsb = 0, $secret = 0, $chatLevel = 0, $ffm_upload = 0, $id = 0, $alliance = "") {
			$this->name = $name;
			$this->password = $password;
			$this->universe = $universe;
			$this->permissions = $permissions;
			$this->level = $level;
                        $this->validation = $validation;
                        $this->basic_scripts = $basic;
                        $this->advanced_scripts = $advanced;
                        $this->admin_scripts = $admin;
                        $this->ffm_upload = $ffm_upload;
                        $this->sb_script_access = $pfcsb;
                        $this->secret_scripts = $secret;
                        $this->pilotId = $pilotId;
                        $this->chat_level = $chatLevel;
                        $this->id = $id;
                        $this->alliance = $alliance;
		}
                
                public function getId(){
                    return $this->id;
                }

		public function getName() {
			return $this->name;
		}
                
                public function getAlliance(){
                        return $this->alliance;
                }

		public function drawName() {
			$char = new PD_Character($_SESSION["account"]->getUniverse(), $this->name);
			$char->drawName();
		}

		public function getUniverse() {
			return $this->universe;
		}

		public function getPassword() {
			return $this->password;
		}

		public function getRawPermissions() {
			return $this->permissions;
		}

		public function getPermissions() {
			return new Permissions($this->permissions);
		}

		public function getLevel() {
			return $this->level;
		}
                
                public function getValidation(){
                        return $this->validation;
                }
                
                public function getBasic(){
                        return $this->basic_scripts;
                }
                
                public function getAdvanced(){
                        return $this->advanced_scripts;
                }
                
                public function getAdmin(){
                        return $this->admin_scripts;
                }
                
                public function getFFMUpload(){
                        return $this->ffm_upload;
                }
                
                public function getSB(){
                        return $this->sb_script_access;
                }
                
                public function getSecret(){
                        return $this->secret_scripts;
                }
                
                public function getPilotId(){
                        return $this->pilotId;
                }
                
                public function getChatLevel(){
                        return $this->chat_level;
                }
	}
?>
